const fs = require('fs');
const path = require('path');

var filePath = path.join(__dirname,'/4.txt')
var fd = fs.openSync(filePath,'r');
var buf = Buffer.alloc(10);
//将fd中的内容读入buf
var result = fs.readSync(fd,buf)